<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_floating_style addthis_counter_style">
<a class="addthis_button_facebook_like" fb:like:layout="box_count"></a>
<a class="addthis_button_tweet" tw:count="vertical"></a>
<a class="addthis_button_google_plusone" g:plusone:size="tall"></a>
<a class="addthis_counter"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51fa5710765d090e"></script>
<!-- AddThis Button END -->
</div>
<div class="span8">

<div class="row-fluid">
<!-- left side search box container-->
<div class="span12" >
<s:if test="adventuretype == 0">
<!-- Trekking event -->
<div id="trekdetails" >
<s:iterator value="trekpojo">
<div style="text-align: center;">
<h3><s:property value="trektitle" /></h3>
<i class="icon-calendar"></i> <s:property value="date"/>&nbsp;&nbsp;|&nbsp;&nbsp; <i class="icon-globe"></i> <s:property value="location"/>
<br /><br />
<!-- social share starts here -->
<!-- social share ends here -->
</div>
<s:property value="trekplan" escape="false"/>
<ul class="thumbnails">
                  <s:iterator value="imagepojo">
                  <li class="span3">
                  <a href="#" class="thumbnail"><img  src="<s:property value="path" />" /></a>
                  </li>
                  </s:iterator>
                  </ul>
<hr />

<b>Location Detail:</b> <s:property value="locationdetail"/> <br />
<hr />
<b>Gender:</b> <s:property value="gender"/><br />
<b>Duration:</b> <s:property value="duration"/><br />
<b>Distance:</b> <s:property value="distance"/><br />
<b>Difficulty Level:</b> <s:property value="difficultylevel"/><br />
<hr />
<b>Gears Required:</b> <s:property value="gears"/><br />
<b>Organization Name:</b> <s:property value="organizationname"/><br />
<b>Organization Contact:</b> <s:property value="organizationphone"/><br />
</s:iterator>
<hr />
<h3>Ticket Information</h3>
<table class="table table-striped">
              <thead>
                <tr>
                  <th>Ticket Type</th>
                  <th>End Date</th>
                  <th>Price</th>
                  <th>Fee</th>
                  <th>Available Quantity</th>
                  <th></th>
                </tr>
              </thead>
              <tbody>
              <s:iterator value="ticketpojo" var="tktpojo">
                <tr>
                  <td><s:property value="tickettype" /></td>
                  <td><s:property value="enddate" /></td>
                  <td><s:property value="amount" /></td>
                  <td><s:property value="fee" /></td>
                  <td><s:property value="quantityleft" /></td>
                  <td>
                  <s:if test="#tktpojo.daysleftfortktenddate lte 0">Sorry! booking closed</s:if>
                  <s:else>
                  <s:if test="#tktpojo.quantityleft != 0"> <s:form theme = "simple" cssClass="form-horizontal" action="confirmbooking" method="post" validate="true">
<s:hidden name="adventureid" value="%{eventid}"></s:hidden>
<s:hidden name="adventuretype" value="%{eventtype}"></s:hidden>
<s:hidden name="ticketid" value="%{ticketid}"></s:hidden>
<s:hidden name="tickettype" value="%{tickettype}"></s:hidden>
<s:hidden name="ticketprice" value="%{amount}"></s:hidden>
<s:hidden name="ticketfee" value="%{fee}"></s:hidden>
Select Quantity: <select name="selectedquantity" Class="span3">
<s:iterator var="counter" begin="1" end="%{quantityleft}" >
<option value="<s:property value="#counter"/>"><s:property value="#counter"/></option>
</s:iterator>
</select>
<s:if test="hasFieldErrors()">
   			 <div class="alert alert-error span8">  
  		 		<s:fielderror><s:param>quantity</s:param></s:fielderror>
  		  </div> 
  		 </s:if>
<s:submit name="buyticket" theme = "simple" cssClass="btn btn-success" value="Buy Ticket"></s:submit>
</s:form></s:if> </s:else>
<s:else>Sorry! no ticket available</s:else></td>
                </tr>
                </s:iterator>
           	   </tbody>
            </table>
<!-- <div id="ticketdetails">
<s:iterator value="ticketpojo">
<b>Ticket Type: </b><s:property value="tickettype" /><br />
<b>Amount: </b><s:property value="amount" /><br />
<b>Quantity: </b><s:property value="quantity" /><br />
<b>Details: </b><s:property value="description" /><br />
<b>Ending Date: </b><s:property value="enddate" /><br />
<b>Ticket Allowed Per Order: </b><s:property value="ticketallowedperorder" />
</s:iterator>
</div>
-->
<!--Trekking event ends here-->
</div>
</s:if>
<br /><br />
<hr />
    <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'bookyourtrek'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
    
</div>
</div>
</div>
<div class="span2">

</div>
</div>
</div>
<!-- social share starts here -->

<!-- social share ends here -->
